<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png" />
    <div>
      <button @click="show1 = true">显示第一个HelloWorld</button>
      <button @click="show2 = true">显示第二个HelloWorld</button>
    </div>
    <HelloWorld msg="我的第一个HelloWorld" v-if="show1" />
    <HelloWorld msg="我的第二个HelloWorld" v-show="show2" />
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";

export default {
  name: "HomeView",
  data() {
    return {
      show1: false,
      show2: false,
    };
  },
  components: {
    HelloWorld,
  },
  methods: {},
};
</script>
